<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>卖家-修改个人信息</title>
<link href="<?php echo $this->_webroot('/user/css/common.css'); ?>" rel="stylesheet" type="text/css" />
<link href="<?php echo $this->_webroot('/user/css/content1.css'); ?>" rel="stylesheet" type="text/css" />
<script src="<?php echo $this->_webroot('/user/js/jquery-1.7.1.min.js'); ?>" type="text/javascript"></script>
<script src="<?php echo $this->_webroot('/user/js/common.js'); ?>" type="text/javascript"></script>


 
</head>
<body>
<psp:tags     htmlname='user_topnav1'  iconname='usertopnav1' />
<psp:tags     htmlname='user_topsearch'  iconname='usertopsearch' />

<div class="main">
	<div class="main-left">
    	<div class="title">会员管理中心</div>
        <psp:tags     htmlname='user_menulist'  iconname='usermenulist' />
    </div>
<link href="<?php echo $this->_webroot('/user/css/shoprequest.css'); ?>" rel="stylesheet" type="text/css" />   

    <div class="main-right main_right">
	

            <div class="cont">
                <div class="cont_title"><span class="tr_op"><a href="<?php echo $this->_url('goods/ulist/');?>">返回商品列表</a></span>CSV导出</div>           
<div style="height:5px;" class="clear"></div>
				<hr />
<style type="text/css">
th{background:#EFEFEF}
.red { color:red; }
.edit span{background:#efefef;}
.search {margin:5px;}
.search input {color:#444;}
.clear {clear:both;}

#bgdiv { background-color:#333; position:absolute; left:0px; top:0px; opacity:0.4; filter:alpha(opacity=40); width:100%; height:1000px; z-index:960}
#category_select { width:800px; z-index:961; position:absolute; filter:alpha(opacity=95); left:100px; top:160px; background-color:#fff; height:270px}
.category_title_1 {background:#F6A248; color:#fff; padding-left:10px; line-height:25px; font-weight:bold; font-size:14px;}
.category_title_1 span {float:right; padding-right:5px; cursor:pointer;}
.ulselect {width:198px; height:210px; overflow-x:hidden; overflow-y:scroll; border:1px solid #efefef; float:left;}
.ulselect li {line-height:21px; padding-left:5px; cursor:pointer; }
.ulselect li:hover {background:#F6A248; color:#fff;}
.ulselect li.select {background:#F6A248; color:#fff;}
.category_com {height:30px; line-height:30px; text-align:center;}
.attr_class { background:#F8F8F8; }
.attr_class div.div {border:2px solid #fff; padding:3px;}
.attr_class div span.left{display:block; width:150px; float:left; margin-left:10px; text-align:right; _line-height:24px;}
.attr_class div span.right{display:block; width:350px; float:left; margin-left:5px; text-align:left;}
.attr_class div span.right input {margin-left:5px;}

#picspan {width:82px; height:82px; padding:1px; border:1px solid #efefef; line-height:80px; text-align:center; display:inline-block; overflow:hidden; float:right;}
</style>

			<form action="<?php echo $this->_url('csv/docsvexport');?>" method="post" id="cvsform" name='cvsform' onsubmit="return checkform(this)">
				<input type="hidden" name="shop_id" value="<?php echo $shop_id;?>" />
					<table width="100%" style="border:0" cellspacing="0">
						<tr>
							<td width="120" align="right">导出的文件名:</td><td width="180"><input type="text" name="filename" value="" /></td><td>请输入要导出的文件名</td>
						</tr>
						<tr>
							<td valign="top" align="right">请选择要导出的商品:</td>
							<td align="left" colspan="2">
							<div style="height:155px; overflow-y:auto; overflow-x:hidden;">
							<?php foreach($goods_list as $value){?>
								<input type="checkbox" name="goods_id[]"  value="<?php echo $value['goods']['id'];?>" checked /><?php echo $value['goods']['goods_name'];?><br />
							<?php }?>
							</div>
								<input type="checkbox" name="allgoods" checked value="1" onclick="chose()" />全部商品
							</td>
						</tr>
						<tr>
							<td align="right">导出编码:</td>
							<td align="left" colspan="2">
									<select name="chast" id="chast" onchange="check();">
									<option value="gbk" selected>GBK</option>
									<!--<option value="gb2312">GB2312</option>
									<option value="utf-8">UTF-8</option>-->
								</select>
							</td>
						</tr>
						<tr><td></td>
							<td colspan="2">
								<input class="submit" type="submit" name="submit" value="CSV导出" />
							</td>
						</tr>
					</table>
			</form>
			  
			  
            </div>


    </div>
    <div class="clear"></div>
</div>

<div class="footer">
    <psp:tags     htmlname='user_footer_helper'  iconname='userfooterhelper' />

</div>
<script language="JavaScript" type="text/javascript">
	function chose(){
		var formobj = document.forms['cvsform'];
		var goodsobj = document.getElementsByName('goods_id[]');
		if(!formobj.allgoods.checked){
			formobj.allgoods.checked=false;
			for(i=0;i<goodsobj.length;i++){
				document.getElementsByName('goods_id[]')[i].checked=false;
			}
		}else{
			formobj.allgoods.checked=true;
			for(i=0;i<goodsobj.length;i++){
				document.getElementsByName('goods_id[]')[i].checked=true;
			}
		}
	}
	function checkform(obj){
		var goodsobj = document.getElementsByName('goods_id[]');
		var checkednum=0;
		for(i=0;i<goodsobj.length;i++){
			if(document.getElementsByName('goods_id[]')[i].checked){
				checkednum+=1;
			}
		}
		if(obj.filename.value.length<1){
			alert("请输入要导出的文件名");
			return false;
		}
		if(checkednum<1){
			alert("请选择要导出的商品");
			return false;
		}
	}
	function check(){
		var asd=document.getElementById('chast').value;
		if(asd=="utf-8"){
			alert("选择该编码，打开文件会出现乱码，建议选择GBK编码");
		}
	}
</script>
</body>
</html>